<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SkyRide Connect</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-image: url('/images/2.png'); /* 设置背景图片 */
            background-size: cover; /* 覆盖整个页面 */
            background-position: center; /* 居中显示 */
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        h1, h2 {
            text-align: center;
            color: #333;
        }

        h1 {
            font-size: 2.5em;
            margin-bottom: 0;
        }

        h2 {
            font-size: 1.5em;
            margin-top: 0;
        }

        .container {
            max-width: 400px;
            width: 100%;
            background: rgba(255, 255, 255, 0.3); /* 半透明背景以增强可读性 */
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        label {
            font-weight: bold;
            margin-top: 20px;
        }

        input[type="text"], input[type="password"] {
            width: calc(100% - 20px);
            padding: 10px;
            margin-top: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-sizing: border-box;
            font-size: 16px;
        }

        button {
            background-color: #5cb85c;
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            margin-top: 15px;
            width: 100%;
            transition: background-color 0.3s;
        }

        button:hover {
            background-color: #4cae4c;
        }

        .sign-up-link {
            margin-top: 10px;
            font-size: 14px;
            color: #5cb85c;
            text-align: center;
            display: block;
        }

        .sign-up-link:hover {
            text-decoration: underline;
        }
        .error-message {
            color: red;
            margin-top: 10px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="branding">
        <h1>SkyRide Connect</h1>
        <h2>预约您的未来之旅，直达天空之巅</h2>
    </div>
    <form th:object="${user}" th:action="@{/prt/login}" method="post">
        <label>Username/用户名:</label>
        <input type="text" th:field="*{username}" />

        <label>Password/密码:</label>
        <input type="password" th:field="*{password}" />

        <button type="submit">登录</button>
        <!-- 显示错误消息 -->
        <div th:if="${error}" class="error-message">
            <span th:text="${error}"></span>
        </div>
    </form>
    <div class="sign-up-link">
        <a th:href="@{/prt/register}">没有账号？去注册</a>
        <a th:href="@{/prt/forget}">忘记密码？</a>
        <a th:href="@{/prt/index}">跳过登录</a>
    </div>
</div>
</body>
</html>

<!--<!DOCTYPE html>-->
<!--<html xmlns:th="http://www.w3.org/1999/xhtml">-->
<!--<head>-->
<!--    <meta charset="UTF-8">-->
<!--    <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<!--    <title>Login</title>-->
<!--    <style>-->
<!--        body {-->
<!--            font-family: Arial, sans-serif;-->
<!--            background-color: #f4f4f4;-->
<!--            margin: 0;-->
<!--            padding: 20px;-->
<!--            display: flex;-->
<!--            justify-content: center;-->
<!--            align-items: center;-->
<!--            min-height: 100vh;-->
<!--        }-->

<!--        h2 {-->
<!--            text-align: center;-->
<!--            color: #333;-->
<!--        }-->

<!--        .container {-->
<!--            max-width: 400px;-->
<!--            width: 100%;-->
<!--            background: white;-->
<!--            padding: 20px;-->
<!--            border-radius: 10px;-->
<!--            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);-->
<!--        }-->

<!--        label {-->
<!--            font-weight: bold;-->
<!--            margin-top: 10px;-->
<!--            display: block;-->
<!--        }-->

<!--        input[type="text"], input[type="password"] {-->
<!--            width: 100%;-->
<!--            padding: 10px;-->
<!--            margin-top: 5px;-->
<!--            border: 1px solid #ccc;-->
<!--            border-radius: 5px;-->
<!--            box-sizing: border-box;-->
<!--            font-size: 16px;-->
<!--        }-->

<!--        button {-->
<!--            background-color: #5cb85c;-->
<!--            color: white;-->
<!--            border: none;-->
<!--            padding: 10px 15px;-->
<!--            border-radius: 5px;-->
<!--            cursor: pointer;-->
<!--            font-size: 16px;-->
<!--            margin-top: 15px;-->
<!--            width: 100%;-->
<!--            transition: background-color 0.3s;-->
<!--        }-->

<!--        button:hover {-->
<!--            background-color: #4cae4c;-->
<!--        }-->

<!--        .sign-up-link {-->
<!--            margin-top: 10px;-->
<!--            font-size: 14px;-->
<!--            color: #5cb85c;-->
<!--            text-align: center;-->
<!--            display: block;-->
<!--        }-->

<!--        .sign-up-link:hover {-->
<!--            text-decoration: underline;-->
<!--        }-->
<!--        .error-message {-->
<!--            color: red;-->
<!--            margin-top: 10px;-->
<!--        }-->
<!--    </style>-->
<!--</head>-->
<!--<body>-->
<!--<div class="container">-->
<!--    <h2>登录</h2>-->
<!--    <form th:object="${user}" th:action="@{/prt/login}" method="post">-->
<!--        <label>Username/用户名:</label>-->
<!--        <input type="text" th:field="*{username}" />-->

<!--        <label>Password/密码:</label>-->
<!--        <input type="password" th:field="*{password}" />-->

<!--        <button type="submit">登录</button>-->
<!--        &lt;!&ndash; 显示错误消息 &ndash;&gt;-->
<!--        <div th:if="${error}" class="error-message">-->
<!--            <span th:text="${error}"></span>-->
<!--        </div>-->
<!--    </form>-->
<!--    <div class="sign-up-link">-->
<!--        <a th:href="@{/prt/register}">没有账号？去注册</a>-->
<!--        <a th:href="@{/prt/forget}">忘记密码？</a>-->
<!--    </div>-->
<!--</div>-->

<!--</body>-->
<!--</html>-->
<!--&lt;!&ndash;<!DOCTYPE html>&ndash;&gt;-->
<!--&lt;!&ndash;<html xmlns:th="http://www.w3.org/1999/xhtml">&ndash;&gt;-->
<!--&lt;!&ndash;<head>&ndash;&gt;-->
<!--&lt;!&ndash;    <meta charset="UTF-8">&ndash;&gt;-->
<!--&lt;!&ndash;    <meta name="viewport" content="width=device-width, initial-scale=1.0">&ndash;&gt;-->
<!--&lt;!&ndash;    <title>Login</title>&ndash;&gt;-->
<!--&lt;!&ndash;    <style>&ndash;&gt;-->
<!--&lt;!&ndash;        body {&ndash;&gt;-->
<!--&lt;!&ndash;            font-family: Arial, sans-serif;&ndash;&gt;-->
<!--&lt;!&ndash;            background-color: #f4f4f4;&ndash;&gt;-->
<!--&lt;!&ndash;            margin: 0;&ndash;&gt;-->
<!--&lt;!&ndash;            padding: 20px;&ndash;&gt;-->
<!--&lt;!&ndash;            display: flex;&ndash;&gt;-->
<!--&lt;!&ndash;            justify-content: center;&ndash;&gt;-->
<!--&lt;!&ndash;            align-items: center;&ndash;&gt;-->
<!--&lt;!&ndash;            min-height: 100vh;&ndash;&gt;-->
<!--&lt;!&ndash;        }&ndash;&gt;-->

<!--&lt;!&ndash;        h2 {&ndash;&gt;-->
<!--&lt;!&ndash;            text-align: center;&ndash;&gt;-->
<!--&lt;!&ndash;            color: #333;&ndash;&gt;-->
<!--&lt;!&ndash;        }&ndash;&gt;-->

<!--&lt;!&ndash;        .container {&ndash;&gt;-->
<!--&lt;!&ndash;            max-width: 400px;&ndash;&gt;-->
<!--&lt;!&ndash;            width: 100%;&ndash;&gt;-->
<!--&lt;!&ndash;            background: white;&ndash;&gt;-->
<!--&lt;!&ndash;            padding: 20px;&ndash;&gt;-->
<!--&lt;!&ndash;            border-radius: 10px;&ndash;&gt;-->
<!--&lt;!&ndash;            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);&ndash;&gt;-->
<!--&lt;!&ndash;        }&ndash;&gt;-->

<!--&lt;!&ndash;        label {&ndash;&gt;-->
<!--&lt;!&ndash;            font-weight: bold;&ndash;&gt;-->
<!--&lt;!&ndash;            margin-top: 10px;&ndash;&gt;-->
<!--&lt;!&ndash;            display: block;&ndash;&gt;-->
<!--&lt;!&ndash;        }&ndash;&gt;-->

<!--&lt;!&ndash;        input[type="text"], input[type="password"] {&ndash;&gt;-->
<!--&lt;!&ndash;            width: 100%;&ndash;&gt;-->
<!--&lt;!&ndash;            padding: 10px;&ndash;&gt;-->
<!--&lt;!&ndash;            margin-top: 5px;&ndash;&gt;-->
<!--&lt;!&ndash;            border: 1px solid #ccc;&ndash;&gt;-->
<!--&lt;!&ndash;            border-radius: 5px;&ndash;&gt;-->
<!--&lt;!&ndash;            box-sizing: border-box;&ndash;&gt;-->
<!--&lt;!&ndash;            font-size: 16px;&ndash;&gt;-->
<!--&lt;!&ndash;        }&ndash;&gt;-->

<!--&lt;!&ndash;        button {&ndash;&gt;-->
<!--&lt;!&ndash;            background-color: #5cb85c;&ndash;&gt;-->
<!--&lt;!&ndash;            color: white;&ndash;&gt;-->
<!--&lt;!&ndash;            border: none;&ndash;&gt;-->
<!--&lt;!&ndash;            padding: 10px 15px;&ndash;&gt;-->
<!--&lt;!&ndash;            border-radius: 5px;&ndash;&gt;-->
<!--&lt;!&ndash;            cursor: pointer;&ndash;&gt;-->
<!--&lt;!&ndash;            font-size: 16px;&ndash;&gt;-->
<!--&lt;!&ndash;            margin-top: 15px;&ndash;&gt;-->
<!--&lt;!&ndash;            width: 100%;&ndash;&gt;-->
<!--&lt;!&ndash;            transition: background-color 0.3s;&ndash;&gt;-->
<!--&lt;!&ndash;        }&ndash;&gt;-->

<!--&lt;!&ndash;        button:hover {&ndash;&gt;-->
<!--&lt;!&ndash;            background-color: #4cae4c;&ndash;&gt;-->
<!--&lt;!&ndash;        }&ndash;&gt;-->
<!--&lt;!&ndash;    </style>&ndash;&gt;-->
<!--&lt;!&ndash;</head>&ndash;&gt;-->
<!--&lt;!&ndash;<body>&ndash;&gt;-->
<!--&lt;!&ndash;<div class="container">&ndash;&gt;-->
<!--&lt;!&ndash;    <h2>登录</h2>&ndash;&gt;-->
<!--&lt;!&ndash;    <form th:object="${user}" th:action="@{/prt/login}" method="post">&ndash;&gt;-->
<!--&lt;!&ndash;        <label>Username/用户名:</label>&ndash;&gt;-->
<!--&lt;!&ndash;        <input type="text" th:field="*{username}" />&ndash;&gt;-->

<!--&lt;!&ndash;        <label>Password/密码:</label>&ndash;&gt;-->
<!--&lt;!&ndash;        <input type="password" th:field="*{password}" />&ndash;&gt;-->

<!--&lt;!&ndash;        <button type="submit">登录</button>&ndash;&gt;-->
<!--&lt;!&ndash;    </form>&ndash;&gt;-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->

<!--&lt;!&ndash;</body>&ndash;&gt;-->
<!--&lt;!&ndash;</html>&ndash;&gt;-->